package base.system;

import java.util.concurrent.CompletableFuture;
import java.util.concurrent.ExecutionException;

/**
 * Frames处右键打开Async Stack Traces
 * 过滤漏斗查看
 */
public class AsyncDebug {
    public static void main(String[] args) throws ExecutionException, InterruptedException {
        CompletableFuture.runAsync(AsyncDebug::getLine).get();
    }

    private static void getLine() {
        try {
            CompletableFuture.runAsync(AsyncDebug::getLine2).get();
        } catch (InterruptedException | ExecutionException e) {
            e.printStackTrace();
        }
    }

    private static void getLine2() {
        System.out.println("line2");
    }
}
